package com.bjpowernode.springboot.web.controller;

import com.bjpowernode.springboot.domain.User;
import com.bjpowernode.springboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * CreateTime：2020/8/31 20:05
 */

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/getUserList")
    @ResponseBody
    public List<User> getUserList(){
        List<User> uList = userService.getUserList();
        return uList;
    }
}
